<extend name="Public/List/Common"/>

<if condition="I('pageHeader')=='navtab'">
    <literal>
        <block name="pageHeader">
            <include file="Public/List/Header/header.search.add.batchDel.navtab" add-title="添加"/>
        </block>
    </literal>
<elseif condition="I('pageHeader')=='common'" />
    <literal>
        <block name="pageHeader">
            <include file="Public/List/Header/header.search"/>
        </block>
    </literal>
<elseif condition="I('pageHeader')=='dialog'" />
    <literal>
        <block name="pageHeader">
            <include file="Public/List/Header/header.search.add.batchDel" add-title="添加"/>
        </block>
    </literal>
<elseif condition="I('pageHeader')=='null'" />
    <literal>
        <block name="pageHeader">
        </block>
    </literal>
<elseif condition="I('pageHeader')=='inherit'" />
</if>


<block name="pageContent">
    <div class="bjui-pageContent tableContent">
        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <volist name="tableInfoArray" id="tableInfo">
                    <if condition="!disposColumnSpecialMark($tableInfo[$columnCommentKey], 'index')">
                        <th>
                            {$tableInfo[$columnCommentKey]|disposColumnComment=$tableInfo[$columnNameKey]}
                        </th>
                    </if>
                </volist>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <literal>
                <volist name="</literal>{$TableName}<literal>List" id="vo">
            </literal>
            <tr>
                <volist name="tableInfoArray" id="tableInfo">
                    <if condition="!disposColumnSpecialMark($tableInfo[$columnCommentKey], 'index')">
                        <if condition="disposColumnSpecialMark($tableInfo[$columnCommentKey], 'picture', 'type')">
                            <td width="150px">
                                <div
                                    data-toggle="upload"
                                    data-uploader="<literal>{:U('upload', array('field_name'=></literal>{$tableInfo[$columnNameKey]}, 'id'=>$vo['id']))}</literal>"
                                    data-file-size-limit="1024000000"
                                    data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
                                    data-multi="true"
                                    data-on-upload-success="custom_pic_upload_success"
                                    data-icon="cloud-upload"></div>
                                <span>
                                    <img width="100" src="<literal>{$vo.</literal>{$tableInfo[$columnNameKey]}<literal>|urlAddDomain}</literal>" onerror="$(this).hide();" alt="没有图片">
                                </span>
                            </td>
                        <else />
                            <td>
                                <literal>{$vo.</literal>{$tableInfo[$columnCommentKey]|disposColumnFunction=$tableInfo[$columnNameKey]}}
                            </td>
                        </if>
                    </if>
                </volist>
                <td>
                    <a href="<literal>{:U('edit?id='.$vo['id'])}</literal>" class="btn btn-green"
                        <if condition="I('pageHeader')=='navtab'">
                            data-toggle="navtab" data-id="add<literal>{$vo['id']}</literal>"
                        <else />
                            data-toggle="dialog"  data-id="dialog-normal" data-mask="true"
                        </if>
                       data-title="编辑{$tableArray.comment}">编辑</a>
                    <if condition="I('isToggleStatus')">
                        <a href="<literal>{:U('toggleStatus?id='.$vo['id'])}</literal>" class="btn btn-<literal>{$vo['status']==0?'blue':'red'}</literal>"
                            data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？"><literal>{$vo['status']==0?'启用':'禁用'}</literal></a>
                    </if>
                    <a href="<literal>{:U('del?id='.$vo['id'])}</literal>" class="btn btn-red"
                       data-toggle="doajax">删除</a>
                </td>
            </tr>
            <literal>
                </volist>
            </literal>
            </tbody>
        </table>
    </div>
</block>